<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>客情中心</title>
    <link rel="stylesheet" href="__WEUI__/style/weui.css"/>
    <link rel="stylesheet" href="__WEUI__/example/example.css"/>
</head>
<body ontouchstart>

    <div class="page__bd">
    <div class="page__hd">
        <h1 class="page__title">{$shop.title}</h1>
        <p class="page__desc">为您提供最好的口碑管理</p>
    </div>
    <div class="weui-cells__title">让机器人更懂你</div>
       <div class="weui-cell weui-cell_switch">
                <div class="weui-cell__bd">接受客情通知</div>
                <div class="weui-cell__ft">
                    <label for="switchCP" class="weui-switch-cp">
                        <input id="switchCP"  class="weui-switch-cp__input" type="checkbox" {if condition="$admin['feed_notice'] eq 1"}checked{/if}>
                        <div class="weui-switch-cp__box"></div>
                    </label>
                </div>
        </div>
    
    <div class="weui-cells__title">本月回复排行榜</div>
    <div class="weui-cells">
    {volist name="admin_chats" id="admin_chat"}
         <a class="weui-cell weui-cell_access" href="">
                <div class="weui-cell__bd">
                    <p>{$admin_chat.admin_nickname}</p>
                </div>
                <div class="weui-cell__ft">{$admin_chat.total}</div>
        </a>
    {/volist}
    </div>
    <div class="weui-cells__title">今日差评{$feeds_bads|count} | 昨日{$yesterday_bads}</div>
    <div class="weui-cells">
    {volist name="feeds_bads" id="feeds_bad"}
         <a class="weui-cell weui-cell_access" href="{$feeds_bad.url}">
                <div class="weui-cell__bd">
                    <p>{$feeds_bad.content}</p>
                </div>
                <div class="weui-cell__ft">{$feeds_bad.chats}</div>
        </a>
    {/volist}
    </div>
    <div class="weui-cells__title">今日中评{$feeds_oks|count} | 昨日{$yesterday_oks}</div>
    <div class="weui-cells">
    {volist name="feeds_oks" id="feeds_ok"}
         <a class="weui-cell weui-cell_access" href="{$feeds_ok.url}">
                <div class="weui-cell__bd">
                    <p>{$feeds_ok.content}</p>
                </div>
                <div class="weui-cell__ft">{$feeds_ok.chats}</div>
        </a>
    {/volist}
    </div>
     <div class="weui-cells__title">今日好评{$feeds_goods|count} | 昨日{$yesterday_goods}</div>
    <div class="weui-cells">
    {volist name="feeds_goods" id="feeds_good"}
         <a class="weui-cell weui-cell_access" href="{$feeds_good.url}">
                <div class="weui-cell__bd">
                    <p>{$feeds_good.content}</p>
                </div>
                <div class="weui-cell__ft">{$feeds_good.chats}</div>
        </a>
    {/volist}
    </div>
   
    <div class="page__ft">
        <a href="javascript:home()"><img src="__WEUI__/example/images/icon_footer_link.png" /></a>
    </div>
   
</div>

   
</body>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script src="__JS__/plugins/layer/layer.min.js" type="text/javascript"></script>
<script type="text/javascript" src="__JS__/common.js"></script>
<script type="text/javascript" src="__JS__/toast.js"></script>


<script>
    $(function () {
        $("#switchCP").bind("click",function(){
            // alert($("#switchCP").prop("checked"));
            var myswitch=$("#switchCP").prop("checked");
            var openid='{$admin.openid}';
            $.post("{:url('ajaxFeedNotice')}", {'myswitch': myswitch,openid:openid}, function(result){
                if(result)  {
                   // alert(result);
                }
            });

       })
    })
</script>



</html>
